﻿<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ page import="java.io.*,java.util.*,java.net.*,org.springframework.util.FileCopyUtils" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%
	String userFile = System.getProperty("oa_application.config") + File.separator + "user.properties";
	File file = new File(userFile);
	if (!file.exists()) {
		String userFile1 = System.getProperty("oa_application.config") + File.separator + "user_template.properties";
		File file1 = new File(userFile1);
		FileCopyUtils.copy(file1, file);
	}
	String message = (String)request.getSession().getAttribute("OA_MANAGER");
	if (message == null) message = "";
%>
<html>
<head>
<title>管理控制台</title>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<script src="<c:url value="/scripts/prototype/prototype.js"/>" type="text/javascript"></script>
<script src="<c:url value="/scripts/prototype/scriptaculous.js"/>" type="text/javascript"></script>

<link rel="shortcut icon" type="image/x-icon" href="<c:url value="/oa.ico"/>">
<link href="style.css" type="text/css" rel=stylesheet>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="javascript" for="document" event="onkeydown">
<!--
//-->
</script>
<script language='javascript' type="text/javascript">

function isOnSubmit() {
	if (document.form_static.j_username.value == '') {
		alert("用户名称不能为空");
		document.form_static.j_username.focus();
		return false;
	}
	if (document.form_static.j_password.value == '') {
		alert("用户密码不能为空");
		document.form_static.j_password.focus();
		return false;
	}

	return true;
}

function efocus(event) {
	var elem = Event.element(event);
	elem.style.border = '1 solid #9e9e9e';
}

function eblur(event) {
	var elem = Event.element(event);
	elem.style.border = '1px solid #cccccc';
}

function ekeydown(event) {
	if (event.keyCode == Event.KEY_RETURN)
		event.keyCode = Event.KEY_TAB;
}
</script>
</head>
<body id="login" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgColor="#3186BE">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
	<tr>
		
    <td height="20%" bgcolor="#3186BE">&nbsp;</td>
	</tr>
  <tr>
    <td background="images/logging_middle_background.gif" height="405"> 
      <DIV id="login_static" style="display:inline">
<form name="form_static" method="post" action='logon.jsp' onsubmit="return isOnSubmit();">
          <table width="616" height="325" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
  	<td align="center"><%=message %></td>
  </tr>
  <tr> 
    <td background="images/logging_background_pic.jpg"><table width="98%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="43%" height="30">&nbsp;</td>
        <td width="16%" height="30">管理员帐号：</td>
        <td width="29%" height="30"><input name="j_username" type="text" size="15" style="width:120px"
          	onFocus="efocus(event);" onBlur="eblur(event);" onKeyDown="ekeydown(event)" maxlength="50"></td>
        <td width="12%" height="30">&nbsp;</td>
      </tr>
      <tr>
        <td height="30">&nbsp;</td>
        <td height="30">管理员密码：</td>
        <td height="30"><input name="j_password" type="password" size="15" style="width:120px"
          	onFocus="efocus(event);" onBlur="eblur(event);" maxlength="25"></td>
        <td height="30">&nbsp;</td>
      </tr>
      <tr align="center">
        <td height="30" rowspan="2">&nbsp;</td>
        <td height="15" colspan="3" valign="bottom">&nbsp;</td>
      </tr>
      <tr align="center">
        <td height="15" colspan="3" valign="bottom"><input type="submit" name="Submit" value="&nbsp;登&nbsp;&nbsp;录&nbsp;" class="button" size="25">
&nbsp;&nbsp;
      <input type="reset" name="Submit2" value="&nbsp;重&nbsp;&nbsp;置&nbsp;"  class="button">
        </td>
      </tr>
    </table></td>
  </tr>

</table>
</form>
</DIV>
	</td>
  </tr>
  <tr>
		
    <td height="20%" bgcolor="#3186BE">&nbsp;</td>
	</tr>
</table>

</body>
</html>
